import sys
from PyQt5 import QtGui
from PyQt5.QtWidgets import QApplication
from PyQt5.QtCore import QTranslator
from mainDlg import MainDlg


if __name__ == "__main__":
    # 程序入口main函数，初始化app，启动主窗口
    App = QApplication([])
    trans = QTranslator()
    ret = trans.load('zh_CN.qm')
    App.installTranslator(trans)

    dialog = MainDlg()
    icon = QtGui.QIcon()
    icon.addPixmap(QtGui.QPixmap(":/img/app"), QtGui.QIcon.Normal, QtGui.QIcon.Off)
    dialog.setWindowIcon(icon)
    dialog.show()
    sys.exit(App.exec_())
